const express = require("express");
const getSendData = require("../utils/getSendData");
const bannerServ = require("../services/bannerService");

const router = express.Router();

router.get("/", async (req, res, next) => {
    res.send(getSendData(await bannerServ.getBanner()));
});

router.post("/", async (req, res, next) => {
    res.send(getSendData(await bannerServ.setBanner(req.body)));
});

module.exports = router;
